<template>
  {{ flag }}
  <button @click="handleClick">点击我</button>
  <button @click="handleClick2(1)">点击我2</button>
  <button @click="handleClick3($event,1)">点击我3</button>

</template>
<script setup lang="ts">
import { ref } from 'vue';

const flag = ref<boolean>(true)
const handleClick = (e: Event) => {
  flag.value = !flag.value
  console.log(e.target)
}
const handleClick2 = (type: number) =>{
  console.log(type)
}
const handleClick3 = (e: Event, type: number) => {
  console.log(e.target,type)
}
</script>
<style lang="less" scoped>

</style>